package com.example.rotateimageview.compose

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.example.rotateimageview.R

class ComposeActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
//        setContent {
//            Text("hello compose!")
//        }
    }


//    @Preview
//    @Composable
//    fun composeTestView() {
//        Text("hello ")
//    }
//
//
//    @Composable
//    fun messageCard() {
//        Row(
//            modifier = Modifier.padding(all = 7.dp)
//            ){
//
//            Image(
//                painterResource(id = R.drawable.icon_1),
//                contentDescription = "profile picture",
//                modifier = Modifier
//                    .size(50.dp) // 改变 Image 元素的大小
//                    .clip(CircleShape) // 将图片裁剪成圆形
//            )
//
//            Surface (shape = RoundedCornerShape(3.dp)){
//                Column {
//                    Text(text = "", modifier = Modifier)
//                    Text(text = "")
//                }
//            }
//        }
//    }
//
//
//    @Composable
//    fun roundLayout() {
//        Surface(
//            shape = RoundedCornerShape(8.dp),
//            modifier = Modifier.width(300.dp).height(300.dp)) {
//
//
//        }
//
//    }
}